﻿using System;
using System.Linq;
using Microsoft.Xna.Framework;
using Terraria.Localization;

namespace Terraria.Chat.Commands
{
	// Token: 0x02000496 RID: 1174
	[ChatCommand("Playing")]
	public class ListPlayersCommand : IChatCommand
	{
		// Token: 0x0600276F RID: 10095 RVA: 0x00494A08 File Offset: 0x00492C08
		public void ProcessMessage(string text, byte clientId)
		{
			string text2 = string.Join(", ", from player in Main.player
			where player.active
			select player.name);
			NetMessage.SendChatMessageToClient(NetworkText.FromLiteral(text2), ListPlayersCommand.RESPONSE_COLOR, (int)clientId);
		}

		// Token: 0x040043C1 RID: 17345
		private static readonly Color RESPONSE_COLOR = new Color(255, 240, 20);
	}
}
